<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
  <style>
    div{
      width: 200px;
      height: 200px;
      border: 1px solid red;
      /*超出部分隐藏*/
      overflow: hidden;
      /*超出部分滚动显示*/
      overflow: scroll;
    }
     img{
       vertical-align: baseline;/*基线对齐 默认*/
       /*设置上中下对齐*/
       vertical-align: top;
       vertical-align: middle;
       vertical-align: bottom;
     }
  </style>
</head>
<body>
<input type="text"><img src="../3.jpg"  width="100" alt="">
<div><img src="../3.jpg" alt=""></div>
</body>
</html>